package cn.yitun.chat.yitunservercommonlib.converter.po2vo.group;

import cn.yitun.chat.yitunservercommonlib.dataentity.po.group.GroupInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.group.GroupVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 群组分类
 */
@Mapper(componentModel = "spring")
public interface GroupPo2VoConverter {
    GroupPo2VoConverter INSTANCE = Mappers.getMapper(GroupPo2VoConverter.class);

    GroupInfo vo2po(GroupVo vo);

    List<GroupInfo> vo2po(List<GroupVo> voList);

    @InheritInverseConfiguration
    GroupVo po2vo(GroupInfo info);
    @InheritInverseConfiguration
    List<GroupVo> po2vo(List<GroupInfo> infoList);
}
